Basic Registration

Summary:

  1. Creating an instance of the registration framework requires selection of the following components:
    • Optimizer.
    • Similarity metric.
    • Interpolator.
  2. The registration framework only supports images with sitkFloat32 and sitkFloat64 pixel types (use the SimpleITK Cast() function if your image's pixel type is something else).

  3. Successful registration is highly dependent on initialization. In general you can:

    • Use auxiliary information or user interaction to obtain an initial transformation (avoid resampling).
    • Center the images using the CenteredTransformInitializer.
    • Coarsely sample the parameter space using the Exhaustive Optimizer to obtain one or more initial transformation estimates.
    • Manually initialize, via direct manipulation of transformation parameters and visualization or localization of corresponding points in the two images and then use the LandmarkBasedTransformInitializer.

Registration Components



There are many options for creating an instance of the registration framework, all of which are configured in SimpleITK via methods of the ImageRegistrationMethod class. This class encapsulates many of the components available in ITK for constructing a registration instance.

Currently, the available choices from the following groups of ITK components are:

Optimizers

The SimpleITK registration framework supports several optimizer types via the SetOptimizerAsX() methods, these include:

Similarity metrics

The SimpleITK registration framework supports several metric types via the SetMetricAsX() methods, these include:

Interpolators

The SimpleITK registration framework supports several interpolators via the SetInterpolator() method, which receives one of the following enumerations:

Read images

We first read the images, specifying the pixel type that is required for registration (Float32 or Float64) and look at them. In this notebook we use a CT and MR image from the same patient. These are part of the training data from the Retrospective Image Registration Evaluation (RIRE) project.

Classic Registration

Estimate a 3D rigid transformation between images of different modalities.

We have made the following choices with respect to initialization and registration component settings:

We initialize registration by aligning the centers of the two volumes. To qualitatively evaluate the result we use a linked cursor approach, click on one image and the corresponding point is added to the other image.

Before Registration: misalignment between fixed/moving image is obvious

Screen%20Shot%202021-05-06%20at%2012.47.53%20AM.png

Screen%20Shot%202021-05-05%20at%2010.16.11%20PM.png

Run the next cell three times:

  1. As is.
  2. Uncomment the automated optimizer scale setting so that a change in rotation (radians) has a similar effect to a change in translation (mm).
  3. Uncomment the multi-resolution settings.

Screen%20Shot%202021-05-05%20at%2010.58.25%20PM.png

Screen%20Shot%202021-05-08%20at%2010.39.05%20AM.png

Qualitatively evaluate the result using a linked cursor approach (visual evaluation):

After Registration: significant improvement in alignment

Screen%20Shot%202021-05-06%20at%2012.42.19%20AM.png

Screen%20Shot%202021-05-06%20at%2012.50.25%20AM.png

Screen%20Shot%202021-05-06%20at%2012.44.58%20AM.png

Screen%20Shot%202021-05-08%20at%2010.47.18%20AM.png

If we are satisfied with the results, save them to file.

Next »

Identity transform initialization